package com.wicket.okrrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrrbff.biz.service.ResourceFileService;
import com.wicket.okrrbff.biz.service.dto.req.*;
import com.wicket.okrrbff.biz.service.dto.res.*;
import com.wicket.okrrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrdataassets.integration.FwDataassetsResourceFileClient;
import com.wicket.okrdataassets.integration.dto.LoopAddResourceFileRespDto;
import com.wicket.okrdataassets.integration.dto.LoopAddResourceFileReqDto;
import com.wicket.okrdataassets.integration.dto.ResourceFileDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrdataassets.integration.dto.ImplementEviFilesChainsComRespDto;
import com.wicket.okrdataassets.integration.dto.ImplementEviFilesChainsComReqDto;
import com.wicket.okrrbff.common.exception.Assert;
import com.wicket.okrdataassets.integration.dto.QueryEviRecordDetailComRespDto;
import com.wicket.okrdataassets.integration.dto.QueryEviRecordDetailComReqDto;
import com.wicket.okrdataassets.integration.FwDataassetsIntelligentCommunicationClient;
import com.wicket.okrdataassets.integration.dto.ImplementFileQaRespDto;
import com.wicket.okrdataassets.integration.dto.ImplementFileQaReqDto;
import com.wicket.okrdataassets.integration.dto.QueryResourceFileListComRespDto;
import com.wicket.okrdataassets.integration.dto.QueryResourceFileListComReqDto;
import com.wicket.okrrbff.biz.service.dto.common.BffResourceFileDto;

/**
 * @author ：
 * @date ：
 * 
 * 
 * @version 1.0
 */
@Api(value = "ResourceFile", tags = { "ResourceFile" })
@RestController
// @RequestMapping("/rbff/resourceFile/")
public class ResourceFileController {

  @Autowired
  ResourceFileService resourceFileService;
/**
   * B8修改专辑下文件存档
   * gen by moon at 11/14/2024, 1:20:20 PM
   */
    @PostMapping("/oms/dataassets/resourceFile/updateAlbumFileArchive")
    @ApiOperation(value = "B8修改专辑下文件存档", response = OkrResult.class)
    public OkrResult<BffUpdateAlbumFileArchiveRespDto> updateAlbumFileArchive(@RequestBody(required=false) @Validated BffUpdateAlbumFileArchiveReqDto reqDTO){
        return OkrResult.success(resourceFileService.updateAlbumFileArchive(reqDTO));
    }
/**
   * B8新增资源文件
   * gen by moon at 11/28/2024, 12:07:11 AM
   */
    @PostMapping("/oms/dataassets/resourceFile/addResourceFile")
    @ApiOperation(value = "B8新增资源文件", response = OkrResult.class)
    public OkrResult<BffAddResourceFileRespDto> addResourceFile(@RequestBody(required=false) @Validated BffAddResourceFileReqDto reqDTO){
        return OkrResult.success(resourceFileService.addResourceFile(reqDTO));
    }
/**
   * B8新增资源文件上区块链
   * gen by moon at 12/8/2024, 3:58:00 AM
   */
    @PostMapping("/oms/dataassets/resourceFile/addEviFilesChain")
    @ApiOperation(value = "B8新增资源文件上区块链", response = OkrResult.class)
    public OkrResult<BffAddEviFilesChainRespDto> addEviFilesChain(@RequestBody(required=false) @Validated BffAddEviFilesChainReqDto reqDTO){
        return OkrResult.success(resourceFileService.addEviFilesChain(reqDTO));
    }
/**
   * B8查询存证记录信息
   * gen by moon at 12/10/2024, 12:35:51 AM
   */
    @PostMapping("/oms/dataassets/resourceFile/queryEviRecordDetail")
    @ApiOperation(value = "B8查询存证记录信息", response = OkrResult.class)
    public OkrResult<BffQueryEviRecordDetailRespDto> queryEviRecordDetail(@RequestBody(required=false) @Validated BffQueryEviRecordDetailReqDto reqDTO){
        return OkrResult.success(resourceFileService.queryEviRecordDetail(reqDTO));
    }
/**
   * B8生成文件简介
   * gen by moon at 12/10/2024, 12:35:59 AM
   */
    @PostMapping("/oms/dataassets/resourceFile/questionResourceFileDetail")
    @ApiOperation(value = "B8生成文件简介", response = OkrResult.class)
    public OkrResult<BffQuestionResourceFileDetailRespDto> questionResourceFileDetail(@RequestBody(required=false) @Validated BffQuestionResourceFileDetailReqDto reqDTO){
        return OkrResult.success(resourceFileService.questionResourceFileDetail(reqDTO));
    }
/**
   * B8查询资源文件列表
   * gen by moon at 5/23/2025, 6:12:46 PM
   */
    @PostMapping("/oms/dataassets/resourceFile/queryResourceFileList")
    @ApiOperation(value = "B8查询资源文件列表", response = OkrResult.class)
    public OkrResult<BffQueryResourceFileListRespDto> queryResourceFileList(@RequestBody(required=false) @Validated BffQueryResourceFileListReqDto reqDTO){
        return OkrResult.success(resourceFileService.queryResourceFileList(reqDTO));
    }
}
